<template>
	<view class="content">
		hello world
		<button type="primary" @click="toDetail(1001)">detail</button>
		
		<view class="item" v-for="(item,index) in list" :key="item.id">
			姓名：{{item.name}}
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: 'Hello',
				list:[
					{id:1001,name:"张三",age:21},
					{id:1002,name:"李四",age:24},
					{id:1003,name:"王五",age:32},
					{id:1004,name:"赵六",age:45}
				]
			}
		},
		onLoad() {

		},
		methods: {
			toDetail(id){
				uni.navigateTo({
					url:"/pages/detail/detail?id="+id
				})
			}

		}
	}
</script>

<style>

</style>
